/***************************************************************************
*   Copyleft 2008-2009 by												   *
*	 Iwanicki Krzysztof													   *
*   <gamma.mini.pw.edu.pl/~iwanickik>									   *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
*                                                                         *
*   This program is distributed in the hope that it will be useful,       *
*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
*   GNU General Public License for more details.                          *
***************************************************************************/
#ifndef __VGLMACROS_H__
#define __VGLMACROS_H__

#include <Types/vTypes.h>
#include <gl\gl.h>			
#include <gl\glu.h>			
#include <gl\glaux.h>

namespace Vendetta {
	
	// Macro to test OpenGL errors
	#ifdef V_DEBUG
		#define V_GL_ASSERT \
		{ \
			const vUInt errorId = glGetError(); \
			if (errorId != GL_NO_ERROR) { \
				LOGS_ERROR("OpenGL error caught, error id = %d (file: %s line: %d)", errorId, __FILE__, __LINE__); \
			} \
		}
	#else
		#define V_GL_ASSERT
	#endif

}

#endif // __VGLMACROS_H__